import { defineStore } from "pinia";

const shopSelectStore = defineStore("shopSelect", {
  state: () => ({
    selectDetail: {},
    shopDetail: {}
  }),
  actions: {
    setShopSelect(item) {
      this.selectDetail = item;
    },
    getShopSelect() {
      return this.selectDetail;
    },
    setShopDetail(item) {
      this.shopDetail = item;
    },
    getShopDetail() {
      return this.shopDetail;
    }
  },
  persist: {
    enabled: true,
    strategies: [{ storage: localStorage }] //指定方式localStorage
  }
});
export default shopSelectStore;
